<?php

define("LOCK_DIR", dirname(__FILE__) . DIRECTORY_SEPARATOR);

function createLockFile($token)
{
	$fh = fopen(LOCK_DIR . $token, 'a');	
	fclose($fh);
}

function isLockedFile($token)
{
	return file_exists(LOCK_DIR . $token);
}

function releaseLockFile($token)
{
	unlink(LOCK_DIR . $token);
}

?>